<!-- 
    个人信息页面
 -->

<template>
    <div>
        <el-descriptions :column="1" border>
            <el-descriptions-item label="用户名">{{ user.username }}</el-descriptions-item>
            <el-descriptions-item label="真实姓名">{{ user.realname }}</el-descriptions-item>
            <el-descriptions-item label="电话">{{ user.phone }}</el-descriptions-item>
            <el-descriptions-item label="最近登录时间">{{ user.gmtLastLogin }}</el-descriptions-item>
            <el-descriptions-item label="角色">{{ user.roles }}</el-descriptions-item>
            <el-descriptions-item label="状态">
                <el-tag v-if="user.status" effect="dark">正常</el-tag>
                <el-tag v-else type="info" effect="dark">禁止</el-tag>
            </el-descriptions-item>
        </el-descriptions>
    </div>
</template>

<script lang="ts" setup>
import { useUserStore } from '@/stores/admin';
const store = useUserStore();
const user = store.user
</script>